﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace Beryl
{
    /// <summary>
    /// ProductReports 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class ProductReports : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }
        [WebMethod(Description = "查询流传单")]
        public string[] selectBarCode(string barcode, string Data)
        {
            return Model.ProductionReport.Instance.getBarCode(barcode,Data).ToArray();
        }

        [WebMethod(Description ="查询工序信息")]
        public string[] selectQueryData(string para, string Data)
        {
            return Model.ProductionReport.Instance.getQueryData(para, Data).ToArray();
        }

        //[WebMethod(Description ="提交数据检查")]
        //public string[] summitDataCheck(string para)
        //{
        //    return Model.ProductionReport.Instance.CheckPRData(para).ToArray();
        //}


        [WebMethod(Description = "开工记录正常提交数据")]
        public string[] PRSummitData(string para, string Data)
        {
            return Model.ProductionReport.Instance.SummitDual(para, Data).ToArray();
        }

        [WebMethod(Description = "根据时间获取班次")]
        public string[] getTimeBC(string para, string Data)
        {
            return Model.ProductionReport.Instance.getTimeBC(para, Data).ToArray();
        }

        [WebMethod(Description = "不良品提交")]
        public string[] SummitUnProduct(string para, string Data)
        {
            return Model.ProductionReport.Instance.SummitUnPro(para, Data).ToArray();
        }




        //[WebMethod(Description = "开工记录超出数量提交数据")]
        //public string[] OutNumSummit(string para)
        //{
        //    return Model.ProductionReport.Instance.SummitDual(para,1).ToArray();
        //}


        //[WebMethod(Description = "开工记录上工序未报工提交数据")]
        //public string[] NotTopProcessSummit(string para)
        //{

        //    return Model.ProductionReport.Instance.SummitDual(para,2).ToArray();
        //}


        //[WebMethod(Description = "开工记录上工序未报工数量超出提交数据")]
        //public string[] TopProcessOutSummit(string para)
        //{

        //    return Model.ProductionReport.Instance.SummitDual(para,3).ToArray();
        //}
    }
}
